Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netbsd: link to libkvm to fix build error #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmfink
Copy link

@tmfink tmfink commented Apr 22, 2022

NetBSD requires linking to the libkvm library to use functions like kvm_openfiles().

Otherwise, you get a link error like:

  = note: ld: /home/user/sys-info-rs/target/debug/build/sys-info-296322ef26a55e63/out/libinfo.a(netbsd.o): in function `get_proc_total':
          /home/user/sys-info-rs/c/netbsd.c:73: undefined reference to `kvm_openfiles'                        
          ld: /home/user//sys-info-rs/c/netbsd.c:76: undefined reference to `kvm_getprocs'                     
          ld: /home/user/sys-info-rs/c/netbsd.c:77: undefined reference to `kvm_close'                        
          ld: /home/usersys-info-rs/c/netbsd.c:81: undefined reference to `kvm_close'                        
                                                                                                                      
  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link                                                       

NetBSD requires linking to the libkvm library to use functions like
kvm_openfiles().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant